home *** CD-ROM | disk | FTP | other *** search
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Newsgroups: comp.lang.c
- Subject: Re: Converting integer to
- Date: 10 Feb 1996 07:58:37 GMT
- Organization: Ripco Communications, Inc.
- Message-ID: <4fhj7d$fe2@gail.ripco.com>
- NNTP-Posting-Host: golden.ripco.com
-
- Gilbert Banks <gilbertb@bnr.ca>
- in <4f5ehf$48i@brtph500.bnr.ca> asks:
-
- >What is the function and header for converting an integer to char or string?
- >I think the header is <stdlib.h>.
-
- #include <stdio.h>
- /* ... */
- char theString[BUFSIZ]; /* whatever's enough */
- int theInteger;
- /* ... */
- sprintf(theString,"%d",theInteger);
- /* ... */
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-